/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.clicarros.dao.Implementacao.veiculo;

import br.com.clicarros.dao.Implementacao.AbstractDAO;
import br.com.clicarros.dominio.veiculo.Marca;
import br.com.clicarros.util.UtilHibernate;
import java.sql.SQLException;
import java.util.List;
import org.hibernate.Session;

/**
 *
 * @author Bruno
 */
public class DAOMarca extends AbstractDAO {
    
 

    
    @Override
    public Object consultarId(Object o) throws ClassNotFoundException, SQLException, Exception{
        
       Marca m = (Marca) o;
       
      Session session = UtilHibernate.openSession();

       m  = (Marca)  session.load(m.getClass(), m.getIdMarca());  
       
       session.close();
       
       return m;
   }

    @Override
    public List<Object> consultar(Object o) throws ClassNotFoundException, SQLException, Exception {
        throw new UnsupportedOperationException("Not supported yet.");
    }
  }
